<template>
  <div>
     <div class="pl-form-designer-header">
      <div class="header-title">
        <!-- <img src="@/assets/images/pf.png" class="header-logo" /> -->
        <el-tooltip effect="dark" :content="fullName" placement="bottom">
          <p class="header-txt"> · {{fullName}}</p>
        </el-tooltip>
      </div>
      <div class="options">
        <!-- <el-button type="primary" @click="dataFormSubmit()" :disabled="loading" :loading="btnLoading">移动端</el-button>
        <el-button type="primary" @click="dataFormSubmit()" :disabled="loading" :loading="btnLoading">桌面端</el-button> -->
        <el-button type="primary" @click="ShowForm()">表单属性</el-button>
        <el-button type="primary" @click="preview()" :disabled="loading" :loading="btnLoading">预览</el-button>
        <el-button type="primary" @click="dataFormSubmit()" :disabled="loading" :loading="btnLoading">保存</el-button>
        <el-button @click="empty()">清空</el-button>
      </div>
    </div>
  </div>
</template>

<script>
import formDesignerMixin from '../../../mixins/formDesigner'
export default {
  mixins: [formDesignerMixin],
  name: "tool",
  props: ['fullName'],
  data(){
    return{
      dataForm:{
        fullName: "表单设计器"
      },
      btnLoading: false,
      loading: false,
    }
  },
  methods:{
    preview(){
      this.$emit("preview")
    },
    dataFormSubmit() {
      this.$emit("dataFormSubmit")
    },
    ShowForm() {
      this.$emit('ShowForm')
    },
    empty() {
      this.$confirm('确定要清空所有组件吗？', '提示', { type: 'warning' }).then(() => {
        this.$store.state.designer.drawingList = []
        this.idGlobal = 100
      }).catch(() => { })
    },
  }
}
</script>

<style>

</style>